using System;
using System.Windows.Forms;
using fitnesstrack.library;
using fitnesstrack.win.controls;

namespace fitnesstrack.win
{
    public partial class WorkoutForm : Form
    {
        public WorkoutForm()
        {
            InitializeComponent();
        }

        private int categoryId;

        public WorkoutForm(int categoryId) {
            this.categoryId = categoryId;
        }

        private void WorkoutForm_Load(object sender, EventArgs e)
        {
            SubCategoryList subCats = SubCategoryList.GetSubCategoryList(categoryId);
            for (int i = subCats.Count-1; i > -1; i--)
            {
                BFLWorkoutSubGroup grp = new BFLWorkoutSubGroup();
                grp.SubCategoryInfo = subCats[i];
                grp.Dock = DockStyle.Top;
                this.subCatPanel.Controls.Add(grp);
            }
        }
    }
}